$(function () {
    let layer = layui.layer
    //需求1:用户退出
    $("#logout").on('click', function () {
        layer.confirm('确认退出么?', { icon: 3, title: '提示' }, function (index) {
            //do something
            location.href = '/login.html'
            localStorage.removeItem('token')
            layer.close(index);
        });

    })

})